package com.initialize.service.system.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.initialize.common.mybatis.plus.entity.User;
import com.initialize.common.mybatis.plus.mapper.UserMapper;
import org.springframework.stereotype.Service;

/**
 * 服务实现类
 *
 * @author Chill
 */
@Service
public class UserService {


    final
    UserMapper userMapper;


    public UserService(UserMapper userMapper) {
        this.userMapper = userMapper;
    }


    public User selectLoginAndPsd(String loginName) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("u_login", loginName);
        return userMapper.selectOne(queryWrapper);
    }

    public User selectLogin(String username) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("u_login", username);
        return userMapper.selectOne(queryWrapper);
    }
}
